<template>
  <div>
    <project-nav-bar></project-nav-bar>
    <div class="main-feedback">
      <p>意见与反馈</p>
      <van-field
        v-model="message"
        rows="2"
        autosize
        label="留言"
        type="textarea"
        maxlength="50"
        placeholder="请填写你的意见与反馈"
        show-word-limit
      />
      <van-field
        class="calls"
        v-model="value"
        label="联系方式"
        placeholder="邮箱/手机号/微信号"
      />
    </div>
    <add-tab-bar @addClick="addClick">
      <span slot="title">提交</span>
    </add-tab-bar>
  </div>
</template>

<script>
import ProjectNavBar from "./children/ProjectNavBar";
import AddTabBar from "./children/AddTabBar";
import { getSubAction } from "@/network/feedback";
import {Toast} from 'vant'
export default {
  components: {
    ProjectNavBar,
    AddTabBar,
  },
  data() {
    return {
      message: "",
      value: "",
      hh: ''
    };
  },
  methods: {
    addClick() {
      var datass = {
        openId: localStorage.getItem("openId"),
        name: "花开相惜",
        content: this.message,
        phone: this.value,
      };
      getSubAction(datass).then((res) => {
        Toast('提交成功')
        console.log(res);

      });
    },
  },
};
</script>

<style lang="scss" scoped>
.main-feedback {
  margin-top: 49px;
  padding: 10px 10px;
  p {
    padding: 10px 0;
  }
}
</style>